package com.jinghao.tws.entity;

import com.jinghao.core.common.entity.JingHaoBaseEntity;
import com.jinghao.core.common.util.IJingHaoConfiguration.JhTable;
import com.jinghao.core.common.util.IJingHaoConfiguration.JhField;
import com.jinghao.core.common.util.IJingHaoConfiguration.JhCf;

import java.util.Date;
/**
 * (WvTaskInfo)模型对象
 * 
 * @version 1.0
 * @author: 244684437@qq.com
 */
@JhTable(
	jhfields={
		@JhField(jhCf=JhCf.UNID,property="taskUnid"),
		@JhField(jhCf=JhCf.UUID,property="taskUuid"),
		@JhField(jhCf=JhCf.STATUS,property="videoStatus")
	},
	note = ""
)
public class WvTaskInfo extends JingHaoBaseEntity<WvTaskInfo> {
	//======================字段列表========================
	/** 任务unid */
	private Integer	taskUnid;

	/** 任务uuid */
	private String	taskUuid;

	/** 托盘编号 */
	private String	fpalletId;

	/** 环节编码 */
	private String	fprocessId;

	/** 视频JSON信息-medioInfo */
	private String	medioInfo;

	/** 视频生成状态 1:默认状态 2：生成中 9：视频生成错误 */
	private Integer	videoStatus;

	/** 生成比率 */
	private Integer	progress;

	/** 视频生成错误信息 */
	private String	errorInfo;

	/** 开始时间 */
	private Date	createTime;

	/** 最近一次检查时间 */
	private Date	lastCheckTime;

	/** 类型 1：环节任务 2：合并环节任务 3:短损 */
	private Integer	type;

	/** 环节标识UUID */
	private String	fprocessUuid;

	/** 托盘标识UUID */
	private String	fpalletUuid;

	/** 产品标识UUID */
	private String	fproductUuid;

	/** 视频请求ID */
	private String	requestId;

	/** 第一次生成视频错误时间 */
	private Date	firstErrorTime;

	public Integer getTaskUnid() {
		return this.taskUnid;
	}

	public void setTaskUnid(Integer taskUnid) {
		this.taskUnid = taskUnid;
	}

	public String getTaskUuid() {
		return this.taskUuid;
	}

	public void setTaskUuid(String taskUuid) {
		this.taskUuid = taskUuid;
	}

	public String getFpalletId() {
		return this.fpalletId;
	}

	public void setFpalletId(String fpalletId) {
		this.fpalletId = fpalletId;
	}

	public String getFprocessId() {
		return this.fprocessId;
	}

	public void setFprocessId(String fprocessId) {
		this.fprocessId = fprocessId;
	}

	public String getMedioInfo() {
		return this.medioInfo;
	}

	public void setMedioInfo(String medioInfo) {
		this.medioInfo = medioInfo;
	}

	public Integer getVideoStatus() {
		return this.videoStatus;
	}

	public void setVideoStatus(Integer videoStatus) {
		this.videoStatus = videoStatus;
	}

	public Integer getProgress() {
		return this.progress;
	}

	public void setProgress(Integer progress) {
		this.progress = progress;
	}

	public String getErrorInfo() {
		return this.errorInfo;
	}

	public void setErrorInfo(String errorInfo) {
		this.errorInfo = errorInfo;
	}

	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getLastCheckTime() {
		return this.lastCheckTime;
	}

	public void setLastCheckTime(Date lastCheckTime) {
		this.lastCheckTime = lastCheckTime;
	}

	public Integer getType() {
		return this.type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public String getFprocessUuid() {
		return this.fprocessUuid;
	}

	public void setFprocessUuid(String fprocessUuid) {
		this.fprocessUuid = fprocessUuid;
	}

	public String getFpalletUuid() {
		return this.fpalletUuid;
	}

	public void setFpalletUuid(String fpalletUuid) {
		this.fpalletUuid = fpalletUuid;
	}

	public String getFproductUuid() {
		return this.fproductUuid;
	}

	public void setFproductUuid(String fproductUuid) {
		this.fproductUuid = fproductUuid;
	}

	public String getRequestId() {
		return this.requestId;
	}

	public void setRequestId(String requestId) {
		this.requestId = requestId;
	}

	public Date getFirstErrorTime() {
		return this.firstErrorTime;
	}

	public void setFirstErrorTime(Date firstErrorTime) {
		this.firstErrorTime = firstErrorTime;
	}

	public String toString() {
		StringBuffer buffer = new StringBuffer(super.toString());
		buffer.append("\n");
		buffer.append("\ttaskUnid(任务unid):").append(taskUnid);
		buffer.append("\ttaskUuid(任务uuid):").append(taskUuid);
		buffer.append("\tfpalletId(托盘编号):").append(fpalletId);
		buffer.append("\tfprocessId(环节编码):").append(fprocessId);
		buffer.append("\n");
		buffer.append("\tmedioInfo(视频JSON信息-medioInfo):").append(medioInfo);
		buffer.append("\tvideoStatus(视频生成状态 1:默认状态 2：生成中 9：视频生成错误):").append(videoStatus);
		buffer.append("\tprogress(生成比率):").append(progress);
		buffer.append("\terrorInfo(视频生成错误信息):").append(errorInfo);
		buffer.append("\n");
		buffer.append("\tcreateTime(开始时间):").append(createTime);
		buffer.append("\tlastCheckTime(最近一次检查时间):").append(lastCheckTime);
		buffer.append("\ttype(类型 1：环节任务 2：合并环节任务 3:短损):").append(type);
		buffer.append("\tfprocessUuid(环节标识UUID):").append(fprocessUuid);
		buffer.append("\n");
		buffer.append("\tfpalletUuid(托盘标识UUID):").append(fpalletUuid);
		buffer.append("\tfproductUuid(产品标识UUID):").append(fproductUuid);
		buffer.append("\trequestId(视频请求ID):").append(requestId);
		buffer.append("\tfirstErrorTime(第一次生成视频错误时间):").append(firstErrorTime);
		return buffer.toString();
	}
	//==================定制内容开始======================
	   public enum EWvTaskInfo {
	    	/**1：环节任务**/
		     type_1(1,"环节任务"),
	    	/**2：合并环节任务**/
		     type_2(2,"合并环节任务"),
		     /**3：短损**/
		     type_3(3,"短损"),
		     
	    	/**1:默认状态**/
		   videoStatus_1(1,"未生成"),
	    	/**2：生成中**/
		   videoStatus_2(2,"已生成"),
		 	/**9：视频生成错误**/
		   videoStatus_9(9,"视频生成错误");
		     
	    	private int key;
	    	private String msg;
	    	EWvTaskInfo(int key,String msg) {
				this.key = key;
				this.msg=msg;
			}
	    	public int getKey(){
	    		return this.key;
	    	}
	   }
	//==================定制内容结束======================
}
